<!DOCTYPE html>
<html>
<head>
    <title>生成PDF</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.2/css/bootstrap.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h1 class="text-center">生成PDF</h1>
        <div class="row justify-content-center">
            <div class="col-md-6">
                <form action="/generate_pdf" method="post">
                    <div class="form-group">
                        <label for="text">输入文本：</label>
                        <textarea class="form-control" id="text" name="text" rows="5" required></textarea>
                    </div>
                    <div class="text-center">
                        <button type="submit" class="btn btn-primary">生成PDF</button>
                    </div>
                </form>
            </div>
        </div>
        <div class="mt-5 text-center">
            {% if pdf_link %}
                <h4>生成的PDF文件：</h4>
                <a href="{{ pdf_link }}" target="_blank" class="btn btn-success">点击下载</a>
            {% endif %}
        </div>
    </div>
</body>
</html>
